package com.manage.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 执行对象 cm_execute
 *
 * @author ruoyi
 * @date 2025-10-05
 */
@Data
@TableName("cm_execute")
public class CmExecute {
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 外部唯一id */
    private String publicId;

    /** 案件id */
    private Long caseId;

    /** 管辖法院 */
    private String court;

    /** 执行申请书 */
    private Long executionApplicationDocId;

    /** 查封、评估拍卖申请书 */
    private Long freezeEvaluationAuctionApplicationDocId;

    /** 其他执行材料 */
    private String otherExecutionMaterialsDocIds;

    /** 首次执行案号 */
    private String firstExecutionCaseNumber;

    /** 首次执行受理通知书 */
    private Long firstExecutionAcceptanceNoticeDocId;

    /** 首次执行法官 */
    private String firstJudge;

    /** 首次执行助理 */
    private String firstAssistant;

    /** 首次执行书记员 */
    private String firstClerk;

    /** 首次执行法院联系电话 */
    private String firstCourtContact;

    /** 是否有恢复执行：0无，1有 */
    private Integer hasResumeExecution;

    /** 恢复执行案号 */
    private String resumeExecutionCaseNumber;

    /** 恢复执行受理通知书 */
    private Long resumeExecutionAcceptanceNoticeDocId;

    /** 恢复执行法官 */
    private String resumeJudge;

    /** 恢复执行助理 */
    private String resumeAssistant;

    /** 恢复执行书记员 */
    private String resumeClerk;

    /** 恢复执行法院联系电话 */
    private String resumeCourtContact;

    /** 总对总查控是否有财产：0无，1有 */
    private Integer hasPropertyFromQuery;

    /** 查控财产情况 */
    private String queriedPropertyDetails;

    /** 是否已选评估机构：0无，1有 */
    private Integer evaluationInstitutionSelected;

    /** 评估机构 */
    private String evaluationInstitution;

    /** 选定评估时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date evaluationSelectionDate;

    /** 现场评估时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date onSiteEvaluationDate;

    /** 屋内照片 */
    private String onSitePhotosDocIds;

    /** 房屋居住状态（码表值） */
    private Long propertyOccupancyStatus;

    /** 评估费金额 */
    private BigDecimal evaluationFee;

    /** 评估费发票 */
    private Long evaluationFeeInvoiceDocId;

    /** 司法评估报告 */
    private Long evaluationReportDocId;

    /** 评估报告出具日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date evaluationReportIssueDate;

    /** 评估报告到期日 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date evaluationReportExpiryDate;

    /** 评估房屋地址 */
    private String evaluatedPropertyAddress;

    /** 评估价格 */
    private BigDecimal evaluatedPrice;

    /** 司法拍卖机构 */
    private String auctionInstitution;

    /** 是否有一拍：0无，1有 */
    private Integer hasFirstAuction;

    /** 一拍起拍价格 */
    private BigDecimal firstAuctionStartingPrice;

    /** 是否有二拍：0无，1有 */
    private Integer hasSecondAuction;

    /** 二拍起拍价格 */
    private BigDecimal secondAuctionStartingPrice;

    /** 二拍开拍时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date secondAuctionStartTime;

    /** 二拍成交/流拍情况 */
    private String secondAuctionResult;

    /** 二拍成交/流拍情况截图 */
    private String secondAuctionResultScreenshotIds;

    /** 是否有变卖：0无，1有 */
    private Integer hasThirdAuction;

    /** 变卖价格 */
    private BigDecimal thirdAuctionPrice;

    /** 变卖时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date thirdAuctionTime;

    /** 变卖成交/流拍情况 */
    private String thirdAuctionResult;

    /** 变卖成交/流拍情况截图 */
    private String thirdAuctionResultScreenshotIds;

    /** 司法处置是否成功：0无，1有 */
    private Integer disposalSuccessful;

    /** 成交价格 */
    private BigDecimal finalTransactionPrice;

    /** 成交时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date finalTransactionDate;

    /** 买受人 */
    private String buyer;

    /** 买受人联系电话 */
    private String buyerPhone;

    /** 拍卖/变卖费金额 */
    private BigDecimal auctionFee;

    /** 过户税费金额 */
    private BigDecimal transferTaxFee;

    /** 执行费金额 */
    private BigDecimal executionFee;

    /** 唯一住房租金金额 */
    private BigDecimal soleHousingRent;

    /** 债权申报金额 */
    private BigDecimal claimedCreditorRightsAmount;

    /** 债权申报明细 */
    private String claimedCreditorRightsDetails;

    /** 法院扣划金额 */
    private BigDecimal courtDeductionAmount;

    /** 亏损情况 */
    private BigDecimal lossAmount;

    /** 终结执行裁定书 */
    private Long endExecutionVerdictDocId;

    /** 终结本次执行裁定书 */
    private Long endThisExecutionVerdictDocId;

    /** 结案通知书 */
    private Long caseClosingNoticeDocId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date updateTime;

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("publicId", getPublicId())
                .append("caseId", getCaseId())
                .append("court", getCourt())
                .append("executionApplicationDocId", getExecutionApplicationDocId())
                .append("freezeEvaluationAuctionApplicationDocId", getFreezeEvaluationAuctionApplicationDocId())
                .append("otherExecutionMaterialsDocIds", getOtherExecutionMaterialsDocIds())
                .append("firstExecutionCaseNumber", getFirstExecutionCaseNumber())
                .append("firstExecutionAcceptanceNoticeDocId", getFirstExecutionAcceptanceNoticeDocId())
                .append("firstJudge", getFirstJudge())
                .append("firstAssistant", getFirstAssistant())
                .append("firstClerk", getFirstClerk())
                .append("firstCourtContact", getFirstCourtContact())
                .append("hasResumeExecution", getHasResumeExecution())
                .append("resumeExecutionCaseNumber", getResumeExecutionCaseNumber())
                .append("resumeExecutionAcceptanceNoticeDocId", getResumeExecutionAcceptanceNoticeDocId())
                .append("resumeJudge", getResumeJudge())
                .append("resumeAssistant", getResumeAssistant())
                .append("resumeClerk", getResumeClerk())
                .append("resumeCourtContact", getResumeCourtContact())
                .append("hasPropertyFromQuery", getHasPropertyFromQuery())
                .append("queriedPropertyDetails", getQueriedPropertyDetails())
                .append("evaluationInstitutionSelected", getEvaluationInstitutionSelected())
                .append("evaluationInstitution", getEvaluationInstitution())
                .append("evaluationSelectionDate", getEvaluationSelectionDate())
                .append("onSiteEvaluationDate", getOnSiteEvaluationDate())
                .append("onSitePhotosDocIds", getOnSitePhotosDocIds())
                .append("propertyOccupancyStatus", getPropertyOccupancyStatus())
                .append("evaluationFee", getEvaluationFee())
                .append("evaluationFeeInvoiceDocId", getEvaluationFeeInvoiceDocId())
                .append("evaluationReportDocId", getEvaluationReportDocId())
                .append("evaluationReportIssueDate", getEvaluationReportIssueDate())
                .append("evaluationReportExpiryDate", getEvaluationReportExpiryDate())
                .append("evaluatedPropertyAddress", getEvaluatedPropertyAddress())
                .append("evaluatedPrice", getEvaluatedPrice())
                .append("auctionInstitution", getAuctionInstitution())
                .append("hasFirstAuction", getHasFirstAuction())
                .append("firstAuctionStartingPrice", getFirstAuctionStartingPrice())
                .append("hasSecondAuction", getHasSecondAuction())
                .append("secondAuctionStartingPrice", getSecondAuctionStartingPrice())
                .append("secondAuctionStartTime", getSecondAuctionStartTime())
                .append("secondAuctionResult", getSecondAuctionResult())
                .append("secondAuctionResultScreenshotIds", getSecondAuctionResultScreenshotIds())
                .append("hasThirdAuction", getHasThirdAuction())
                .append("thirdAuctionPrice", getThirdAuctionPrice())
                .append("thirdAuctionTime", getThirdAuctionTime())
                .append("thirdAuctionResult", getThirdAuctionResult())
                .append("thirdAuctionResultScreenshotIds", getThirdAuctionResultScreenshotIds())
                .append("disposalSuccessful", getDisposalSuccessful())
                .append("finalTransactionPrice", getFinalTransactionPrice())
                .append("finalTransactionDate", getFinalTransactionDate())
                .append("buyer", getBuyer())
                .append("buyerPhone", getBuyerPhone())
                .append("auctionFee", getAuctionFee())
                .append("transferTaxFee", getTransferTaxFee())
                .append("executionFee", getExecutionFee())
                .append("soleHousingRent", getSoleHousingRent())
                .append("claimedCreditorRightsAmount", getClaimedCreditorRightsAmount())
                .append("claimedCreditorRightsDetails", getClaimedCreditorRightsDetails())
                .append("courtDeductionAmount", getCourtDeductionAmount())
                .append("lossAmount", getLossAmount())
                .append("endExecutionVerdictDocId", getEndExecutionVerdictDocId())
                .append("endThisExecutionVerdictDocId", getEndThisExecutionVerdictDocId())
                .append("caseClosingNoticeDocId", getCaseClosingNoticeDocId())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
